aboutdialog: Fix code snippets
authorTimm Bäder <mail@baedert.org>
Wed, 11 Oct 2017 10:55:01 +0000 (12:55 +0200)
committerTimm Bäder <mail@baedert.org>
Wed, 11 Oct 2017 10:55:01 +0000 (12:55 +0200)
Define all variables and fix a missing comma in the first
gtk_show_about_dialog call.

gtk/gtkaboutdialog.c

index 23482c675734fdf10bc17795f8fb363f1be1f6e4..1f09c02dd60d09e2c263bee3f4822d02afa9c5e9 100644 (file)
  * set the title property explicitly when constructing a GtkAboutDialog,
  * as shown in the following example:
  * |[<!-- language="C" -->
+ * GdkPixbuf *example_logo = gdk_pixbuf_new_from_file ("./logo.png", NULL);
  * gtk_show_about_dialog (NULL,
  *                        "program-name", "ExampleCode",
  *                        "logo", example_logo,
- *                        "title" _("About ExampleCode"),
+ *                        "title", _("About ExampleCode"),
  *                        NULL);
  * ]|
  *
@@ -1771,7 +1772,8 @@ gtk_about_dialog_get_translator_credits (GtkAboutDialog *about)
  * Using gettext(), a simple way to achieve that is to mark the
  * string for translation:
  * |[<!-- language="C" -->
- *  gtk_about_dialog_set_translator_credits (about,
+ * GtkWidget *about = gtk_about_dialog_new ();
+ *  gtk_about_dialog_set_translator_credits (GTK_ABOUT_DIALOG (about),
  *                                           _("translator-credits"));
  * ]|
  * It is a good idea to use the customary msgid “translator-credits” for this